(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
double(0) → 0
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0)
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Rewrite Strategy: FULL

(1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
gt(s(x), s(y)) →+ gt(x, y)
gives rise to a decreasing loop by considering the right hand sides subterm at position [].
The pumping substitution is [x / s(x), y / s(y)].
The result substitution is [ ].

(2) BOUNDS(n^1, INF)

(3) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(4) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

S is empty.
Rewrite Strategy: FULL

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

(7) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
gt, plus, double, aver

They will be analysed ascendingly in the following order:
gt < aver
double < aver

(8) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
gt, plus, double, aver

They will be analysed ascendingly in the following order:
gt < aver
double < aver

(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

Induction Base:
gt(gen_0':s3_0(0), gen_0':s3_0(0)) →RΩ(1)
false

Induction Step:
gt(gen_0':s3_0(+(n5_0, 1)), gen_0':s3_0(+(n5_0, 1))) →RΩ(1)
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) →IH
false

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(10) Complex Obligation (BEST)

(11) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
plus, double, aver

They will be analysed ascendingly in the following order:
double < aver

(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
plus(gen_0':s3_0(n282_0), gen_0':s3_0(b)) → gen_0':s3_0(+(n282_0, b)), rt ∈ Ω(1 + n2820)

Induction Base:
plus(gen_0':s3_0(0), gen_0':s3_0(b)) →RΩ(1)
gen_0':s3_0(b)

Induction Step:
plus(gen_0':s3_0(+(n282_0, 1)), gen_0':s3_0(b)) →RΩ(1)
s(plus(gen_0':s3_0(n282_0), gen_0':s3_0(b))) →IH
s(gen_0':s3_0(+(b, c283_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(13) Complex Obligation (BEST)

(14) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
plus(gen_0':s3_0(n282_0), gen_0':s3_0(b)) → gen_0':s3_0(+(n282_0, b)), rt ∈ Ω(1 + n2820)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
double, aver

They will be analysed ascendingly in the following order:
double < aver

(15) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
double(gen_0':s3_0(n825_0)) → gen_0':s3_0(*(2, n825_0)), rt ∈ Ω(1 + n8250)

Induction Base:
double(gen_0':s3_0(0)) →RΩ(1)
0'

Induction Step:
double(gen_0':s3_0(+(n825_0, 1))) →RΩ(1)
s(s(double(gen_0':s3_0(n825_0)))) →IH
s(s(gen_0':s3_0(*(2, c826_0))))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(16) Complex Obligation (BEST)

(17) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
plus(gen_0':s3_0(n282_0), gen_0':s3_0(b)) → gen_0':s3_0(+(n282_0, b)), rt ∈ Ω(1 + n2820)
double(gen_0':s3_0(n825_0)) → gen_0':s3_0(*(2, n825_0)), rt ∈ Ω(1 + n8250)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
aver

(18) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol aver.

(19) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
plus(gen_0':s3_0(n282_0), gen_0':s3_0(b)) → gen_0':s3_0(+(n282_0, b)), rt ∈ Ω(1 + n2820)
double(gen_0':s3_0(n825_0)) → gen_0':s3_0(*(2, n825_0)), rt ∈ Ω(1 + n8250)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(20) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

(21) BOUNDS(n^1, INF)

(22) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
plus(gen_0':s3_0(n282_0), gen_0':s3_0(b)) → gen_0':s3_0(+(n282_0, b)), rt ∈ Ω(1 + n2820)
double(gen_0':s3_0(n825_0)) → gen_0':s3_0(*(2, n825_0)), rt ∈ Ω(1 + n8250)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(23) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

(24) BOUNDS(n^1, INF)

(25) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
plus(gen_0':s3_0(n282_0), gen_0':s3_0(b)) → gen_0':s3_0(+(n282_0, b)), rt ∈ Ω(1 + n2820)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(26) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

(27) BOUNDS(n^1, INF)

(28) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(29) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

(30) BOUNDS(n^1, INF)